package com.example.springmvcdemo;

import org.springframework.web.bind.annotation.*;

@RequestMapping("/hello")
@RestController
public class HelloController {
    @RequestMapping("/hello1")
    public String hello() {
        return "hello spring mvc1";
    }

    @RequestMapping(value = "/hello2",method = RequestMethod.POST)
    public String hello2() {
        return "hello spring mvc2";
    }

    @GetMapping("/hello3")
    public String hello3() {
        return "hello spring mvc3";
    }

    @PostMapping("/hello4")
    public String hello4() {
        return "hello spring mvc4";
    }
}
